/**
 * 
 */
package com.jushu.storbox.service;

import java.util.List;

import android.content.Context;
import android.os.Handler;

import com.jushu.storbox.entities.FileFolderInfo;
import com.huawei.sharedrive.sdk.android.exception.ClientException;
import com.huawei.sharedrive.sdk.android.model.request.CopyFileRequest;
import com.huawei.sharedrive.sdk.android.modelV2.request.MoveFileRequestV2;
import com.huawei.sharedrive.sdk.android.modelV2.response.FileInfoResponseV2;

public interface IRemoteShareFileService {

	/**
	 * 
	 * @param autoManualFlag
	 * @param context
	 * @param folderID
	 * @param des
	 * @param limit
	 * @param offset
	 * @param orderby
	 * @return
	 * @throws ClientException
	 */
	public List<FileFolderInfo> getFileFolderList(String ownerId, boolean autoManualFlag,
			final Context context, String folderID, String des, int limit,
			int offset, String orderby) throws ClientException;

	/**
	 * 
	 * @param context
	 * @param folderID
	 * @return
	 * @throws ClientException
	 */
	public List<FileFolderInfo> getFileFolderList(Context context,String ownerId, 
			String folderID);

	/**
	 * 
	 * @param autoManualFlag
	 * @param context
	 * @param folderID
	 * @param des
	 * @param limit
	 * @param offset
	 * @param orderby
	 * @return
	 * @throws ClientException
	 */
	public List<FileFolderInfo> getSharedFileFolderList(boolean autoManualFlag,
			Context context, String folderID, String des, int limit,
			int offset, String orderby, String shareOwnerId, String ownerBy)
			throws ClientException;

	/**
	 * 
	 * @param autoManualFlag
	 * @param context
	 * @param folderID
	 * @param des
	 * @param limit
	 * @param offset
	 * @param orderby
	 * @return
	 * @throws ClientException
	 */
	public List<FileFolderInfo> getSharedFileFolderListPage(
			boolean autoManualFlag, final Context context, String folderID,
			String des, String orderby, Handler handler, String shareOwnerId)
			throws ClientException;

	public List<FileFolderInfo> getServerShareResourceList(Context context,
			String des, String folderId, String shareOwnerId, String orderBy)
			throws ClientException;

	public List<FileFolderInfo> getBaseServerShareResourceList()
			throws ClientException;

	/**
	 * @param fileId
	 * @return
	 */
	public FileInfoResponseV2 getFileResponse(String fileId);

	/**
	 * @param fileId
	 * @param name
	 * @return
	 */
	public FileInfoResponseV2 renameFile(String ownerId, String fileId, String name)
			throws ClientException;

	/**
	 * @param fileID
	 * @return
	 * @throws ClientException
	 */
	public String deleteFile(String ownerId, String fileID) throws ClientException;

	/**
	 * @param folderID
	 * @param request
	 * @return
	 */
	public String moveFile(String ownerId, String fileId, MoveFileRequestV2 request)
			throws ClientException;

	/**
	 * @param folderID
	 * @param request
	 * @return String
	 * @throws ClientException
	 */
	public String copyFolder(String folderID, CopyFileRequest request)
			throws ClientException;

	/**
	 * @param context
	 * @param limit
	 * @param offset
	 * @param name
	 * @return
	 * @throws ClientException
	 */
	List<FileFolderInfo> searchRemote(Context context, int limit, int offset,
			String name) throws ClientException;

	public void setShareResourceIsChanged(boolean isFolderChange,
			boolean isFileChange);
	public boolean getShareResourceIsChanged();
	
	/**save shared file to my disk by others*/
	public FileInfoResponseV2 copyFileToTarget(FileFolderInfo copyedFileFolderInfo, FileFolderInfo targetFolder)
			throws ClientException;
	
	public void rejectShare(String authorization, long ownerId, long iNodeId) throws ClientException;
}
